#pragma once

/**
* @file Character.h
* @brief Todo
*/

#include "Common.h"

// Engine includes
#include "SpriteAnimation.h"
#include "CollisionMask.h"

class Character : public SpriteAnimation
{
	public:
		 Character(const std::string& path, int x, int y);
		~Character();

		void Update(unsigned int t);

		void Move(float deltaX);
		void Jump();

		void Respawn();
		void Reset();

		bool IsStomped() const {
			return isStomped;
		}

		int GetNumLives() const {
			return numLives;
		}

	protected:
		virtual void OnCollisionEnter(b2Fixture* fixture);
		virtual void OnCollisionLeave(b2Fixture* fixture);
		bool isTouchingGround();

	private:
		bool isStomped;
		int numContact;
		int numLives;
		b2Vec2 spawn;
};